package com.sc.nft.enums;


import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum MarketTypeEnum {

    BRAND_INCUBATION(1, "品牌孵化"),
    FREE_MARKET(2, "自由市场"),
    COPYRIGHT(3, "版权藏品"),
    WANT_BUY_ORDER(4, "求购单"),

    ;

    @EnumValue
    private int code;

    private String description;


    public static MarketTypeEnum getMarketTypeEnum(Integer code) {
        MarketTypeEnum[] values = values();
        for (MarketTypeEnum v : values) {
            if (v.getCode() == code) {
                return v;
            }
        }
        return null;
    }
}
